10 CLS
20 MSG$="Do You Want to Add This Menu to Your AUTOEXEC.BAT File?"
30 ROW=10:GOSUB 9300
40 MSG$="(Y or N)":ROW=12:LNG=1:TEMP$="N":GOSUB 9500
50 IF TEMP$="N" OR TEMP$="n" THEN 360
60 IF TEMP$<>"Y" AND TEMP$<>"y" THEN 40
70 REM
80 REM ----- ADD MENU TO AUTOEXEC.BAT IF NOT ALREADY THERE -----
90 ON ERROR GOTO 230
100 OPEN "AUTOEXEC.BAT" FOR INPUT AS 1
110 ON ERROR GOTO 0
120 IF EOF(1) THEN CLOSE:GOTO 180
130 LINE INPUT #1,TEMP$
140 IF INSTR(TEMP$,"MENU")=0 AND INSTR(TEMP$,"menu")=0 THEN 120
150 CLOSE #1
160 GOTO 360
170 REM ----- NOT FOUND IN AUTOEXEC, ADD -----
180 OPEN "AUTOEXEC.BAT" FOR APPEND AS #1
190 PRINT #1,"MENU"
200 CLOSE #1
210 GOTO 360
220 REM ----- AUTOEXEC.BAT NOT FOUND, ADD -----
230 IF ERR<>53 THEN PRINT ERR:END
240 RESUME 250
250 ON ERROR GOTO 0
260 MSG$="AUTOEXEC.BAT Does Not Exist.":ROW=14:GOSUB 9300
270 MSG$="Do You Want to Create One?"
280 ROW=16:GOSUB 9300
290 MSG$="(Y or N)":ROW=20:LNG=1:TEMP$="N":GOSUB 9500
300 IF TEMP$="N" OR TEMP$="n" THEN 350
310 IF TEMP$<>"Y" AND TEMP$<>"y" THEN 290
320 OPEN "AUTOEXEC.BAT" FOR OUTPUT AS #1
330 "PRINT #1,"MENU"
340 CLOSE #1
350 REM -----
360 REM

